var love = new Vue({
    el: '#lovestory',
    data() {
        return {
            loves:[
            	{username:"紫霞",department:"工学院",publish_time:"2020-5-20",give_like:"20",user_img:"/static/images/background/touxiang.jpg",statement:"如果上天给我一个机会。"} ,
            	],
            sayings:[
            	{username:"七彩祥云",publish_time:"2020-5-20",give_like:"20",user_img:"/static/images/background/touxiang.jpg",statement:"如果上天给我一个机会，我会对那个女孩说三个字。"},
        	],
        	modles:[
            	{username1:"快到碗里来",username2:"你才到碗里去",lovingtime:"2020.5.20",loving:"13:14", level:"一"}
        	] ,
    	modless:[
        	{username1:"月光宝盒",username2:"菠萝菠萝蜜",lovingtime:"2020.5.20",loving:"13:14", level:"二"}
    	]
    }
}
,
mounted: function() {
    // 表白墙
    this.showLove();
}, 
methods: {
	showLove:function(){
        var that = this;
        $.ajax({
            url: basePath +'/wall/getlovewall',		
            type: 'get',
        	contentType: "application/json;charset=UTF-8",
        	dataType: 'json',
        	success: function(msg) {
        	    that.loves=msg.data[0];	
        	    that.sayings=msg.data[1];
        	    console.log(msg.data)
        	},error:function () {
        		console.log("我们表白吧！");
        		 }
        		});        		      
     }
	
}
	
	
});
